<template>
  <div>
    <div class="bx-view">
      <el-input v-model="con" type="textarea" show-word-limit :rows="15" maxlength="2000" />
      <!-- <div class="right-view">
        <div class="btn-tips">推荐配方</div>
        <div style="font-size: 14px;color:#333;padding-top:10px;font-weight:600;">
          基肥
        </div>
        <div style="font-size: 14px;color:#666;padding-top:10px">
          推荐时间：202年05月13日 -
          5月17日 复合肥，30kg/亩
          (可种，肥同播)
        </div>
      </div> -->
    </div>
    <div style="margin: 20px 0 0 0;text-align: right;">
      <el-button size="small" @click="close"><el-icon color="#888" :size="16"><circleClose /></el-icon>取消</el-button>
      <el-button size="small" type="primary" @click="confirm"><el-icon color="#fff" :size="16"><circleCheck /></el-icon>保存</el-button>
    </div>
  </div>
</template>
<script setup>
import { ref, onMounted } from 'vue'
const props = defineProps({
  options: {
    type: Object,
    default: {}
  }
})

const emit = defineEmits(['close'])

const con = ref('')
const defaultTxt = '技术、执行要求'

onMounted(() => {
  con.value = props.options.lineListItem.taskContent
  if (!con.value) {
    con.value = defaultTxt
  }
})

const confirm = () => {
  if (con.value && con.value != defaultTxt) {
    props.options.lineListItem.taskContent = con.value
  }
  close()
}

const close = () => {
  emit('close')
}
</script>
<style lang="scss">

.bx-view{
    display:flex;
    justify-content:space-between;
    .el-textarea__inner{
        background-color:#f7f7f7;
    }
    .left-view{
        background: #F7F7F7;
        width:100%;
    }
    .right-view{
        width: 213px;
        background: #F7F7F7;
        border-radius: 0px 2px 2px 0px;
        margin-left: 10px;
        padding:10px;
        .btn-tips{
            width: 56px;
            height: 14px;
            font-size: 14px;
            font-weight: 500;
            color: #FF9C00;
            line-height: 14px;
            background-color: #FF9C0020;
            padding:10px 15px;
        }
    }
}
</style>
